/**
 * \file IMemoryManager.h
 * \brief IMemoryManager definition class.
 * \author Edouard ROGE
 * \date 06 august 2012
 */

#ifndef _IMEMORYMANAGER_
#define _IMEMORYMANAGER_

#include <stdlib.h>

namespace Core
{
	namespace Memory
	{
		/**
		 * \class IMemoryManager
		 * \brief Interface to specify function to implement when you want to create your own memory manager
		 */
		class IMemoryManager
		{
		public:
			/**
			 * \fn virtual void* Allocate(size_t _iSize)=0;
			 * \param _iSize size of needed allocated memory
			 * \return pointer to the allocated memory, if the pool is full, return 'normal' allocated memory
			 * \brief allocate memory
			 */
			virtual void* Allocate(size_t _iSize) = 0;

			/**
			 * \fn virtual void Free(void * _ptr)=0;
			 * \param _ptr address of the pointer to free
			 * \brief free memory
			 */
			virtual void Free(void * _ptr) = 0;
		};
	}
}

#endif // _IMEMORYMANAGER_
